Karcero : API Documentation

Type DungeonConfigurationGenerator<T>

Namespace Karcero.Engine.Helpers

Public instance methods

DungeonConfigurationGenerator<T> ABitRandom()

Sets randomness to 0.3.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> ABitSparse()

Sets sparseness to 0.3.
Returns
DungeonConfigurationGenerator<T>
The same instance.

void AndTellMeWhenItsDone(Action<Map<T>> callback)

Generates the map with the generated configuration asynchronously.
Parameters
Action<Map<T>> callback
Will be called when the generation process is complete (on a different thread).

DungeonConfigurationGenerator<T> DontRemoveDeadEnds()

Sets the chance to remove dead ends to 0.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> DungeonOfSize(int width, int height)

Sets the size to specific measurements.
Parameters
int width
The desired width.
int height
The desired height.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> HugeDungeon()

Sets the desired size to 100x100.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> LargeDungeon()

Sets the desired size to 45x45.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> MediumDungeon()

Sets the desired size to 33x33.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> NotRandom()

Sets randomness to 0.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> NotSparse()

Sets sparseness to 0.
Returns
DungeonConfigurationGenerator<T>
The same instance.

Map<T> Now()

Generates the map with the generated configuration synchronously.
Returns
Map<T>
The generated map.

DungeonConfigurationGenerator<T> RemoveAllDeadEnds()

Sets the chance to remove dead ends to 1.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> SmallDungeon()

Sets the desired size to 25x25.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> SomewhatRandom()

Sets randomness to 0.6.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> SomewhatSparse()

Sets sparseness to 0.6.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> TinyDungeon()

Sets the desired size to 17x17.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> VeryRandom()

Sets randomness to 1.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> VerySparse()

Sets sparseness to 0.8.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithBigChanceToRemoveDeadEnds()

Sets the chance to remove dead ends to 0.8.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithChanceToRemoveDeadEnds(double chance)

Sets the chance to remove dead ends to a specific value.
Parameters
double chance
The desired chance value.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithLargeNumberOfRooms()

Sets the desired room count to a large value computed according to room size and map size.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithLargeSizeRooms()

Sets the room size range to small to between 5x5 and 8x8.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithMediumChanceToRemoveDeadEnds()

Sets the chance to remove dead ends to 0.53
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithMediumNumberOfRooms()

Sets the desired room count to a medium value computed according to room size and map size.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithMediumSizeRooms()

Sets the room size range to small to between 3x3 and 6x6.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithRandomness(double randomness)

Sets randomness to a specific value.
Parameters
double randomness
The desired randomness value.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithRoomCount(int roomCount)

Sets the desired room count to a specific value
Parameters
int roomCount
The desired room count.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithRoomSize(int minWidth, int maxWidth, int minHeight, int maxHeight)

Sets the room size range to specific measurements.
Parameters
int minWidth
The minimum desired width.
int maxWidth
The maximum desired width.
int minHeight
The minimum desired height.
int maxHeight
The maximum desired height.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithSeed(int seed)

Sets the seed for the map generation to a specific value.
Parameters
int seed
The desired seed.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithSmallChanceToRemoveDeadEnds()

Sets the chance to remove dead ends to 0.23
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithSmallNumberOfRooms()

Sets the desired room count to a small value computed according to room size and map size.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithSmallSizeRooms()

Sets the room size range to small to between 2x2 and 3x3.
Returns
DungeonConfigurationGenerator<T>
The same instance.

DungeonConfigurationGenerator<T> WithSparseness(double sparseness)

Sets sparseness to a specific value.
Parameters
double sparseness
The desired sparseness value.
Returns
DungeonConfigurationGenerator<T>
The same instance.